﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Index/Index_Two.master" AutoEventWireup="true" CodeFile="MedicalRecordList.aspx.cs" Inherits="Index_MedicalRecord_MedicalRecordList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="Server">
    账号管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Info" runat="Server">
    <span>日期：2014年2月28日</span>
    <span>管理员：XXX</span>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Map" runat="Server">
    <a href="../Main.aspx">首页</a>
    <span>&gt;&gt;</span>
    <span>康复评估</span>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Tool" runat="Server">
    <%--<a href="#" class="ui-btn rightCol">查询</a>
    <div class="ui-text-search rightCol">
        <input type="text" class="ui-text-search-input" />
        <span class="ui-text-search-drop">姓名</span>
    </div>--%>

    <%--<asp:Button ID="btn_Add" runat="server" CssClass="ui-btn" Text="注册" OnClick="btn_Add_Click" />
    <asp:Button ID="btn_Edit" runat="server" CssClass="ui-btn" Text="编辑" OnClick="btn_Edit_Click" OnClientClick="return Add()" />
    <asp:Button ID="btn_Del" runat="server" CssClass="ui-btn" Text="删除" OnClick="btn_Del_Click" OnClientClick="return Del()" />--%>
    <asp:HiddenField ID="hf_SelectedUserId" runat="server" Value="-1" />
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Main_Left_Title" runat="Server">
    账号信息
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Main_Left" runat="Server">
    <div class="ui-panel-detail">
        <div class="ui-title">
            <h1>基本信息
                    <%--<asp:LinkButton ID="btn_Edit" runat="server" CssClass="ui-title-lbtn-view" Text="查看>>" OnClick="btn_Edit_Click" OnClientClick="return Add()" />--%>
            </h1>
        </div>
        <table class="ui-panel-detail-table">
            <tr>
                <th>&nbsp;&nbsp;姓&nbsp;&nbsp;&nbsp;&nbsp;名：</th>
                <td><span id="lbl_UserName"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;性&nbsp;&nbsp;&nbsp;&nbsp;别：</th>
                <td><span id="lbl_Gender"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;出生年月：</th>
                <td><span id="lbl_Birthday"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;病&nbsp;案&nbsp;号：</th>
                <td><span id="lbl_RecordNumber"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;床&nbsp;&nbsp;&nbsp;&nbsp;号：</th>
                <td><span id="lbl_BedNumber"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;入院时间：</th>
                <td><span id="lbl_Hospitalized"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;出院时间：</th>
                <td><span id="lbl_Discharged"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;主管医生：</th>
                <td><span id="lbl_Doctor"></span></td>
            </tr>
            <tr>
                <th>主管治疗师：</th>
                <td><span id="lbl_Therapist"></span></td>
            </tr>
            <tr>
                <th>&nbsp;&nbsp;功能诊断：</th>
                <td><span id="lbl_FunctionalDiagnosis"></span></td>
            </tr>
        </table>
        <p>共评估 0 次</p>
    </div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Main_Right_Title" runat="Server">
    账号管理
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="Main_Right" runat="Server">
    <div class="ui-panel-grid">
        <asp:Repeater ID="RepeaterList" runat="server"
            OnItemCommand="RepeaterList_ItemCommand"
            OnItemDataBound="RepeaterList_ItemDataBound">
            <HeaderTemplate>
                <table class="ui-grid" id="grid">
                    <tr>
                        <th style="display: none">选择</th>
                        <th style="width: 40px">序号</t>
                        <th>姓名</th>
                            <th>性别</th>
                            <th>出生年月</th>
                            <th>病案号</th>
                            <th>床号</th>
                            <th>入院时间</th>
                            <th>出院日期</th>
                            <th>主管医生</th>
                            <th>主管治疗师</th>
                            <th>功能诊断</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td style="display: none">
                        <input type="radio" name="UserId" value="<%#Eval("MedicalRecordId") %>" /></td>
                    <td><%#Container.ItemIndex+1 %></td>
                    <td class="UserName"><%#Eval("Name") %></td>
                    <td class="Gender"><%#GetGenderText(Convert.ToInt32(Eval("Gender"))) %></td>
                    <td class="Birthday"><%#Eval("Birthday") %></td>
                    <td class="RecordNumber"><%#Eval("RecordNumber") %></td>
                    <td class="BedNumber"><%#Eval("BedNumber") %></td>
                    <td class="Hospitalized">-</td>
                    <td class="Post">-</td>
                    <td class="Doctor"><%#Eval("Doctor") %></td>
                    <td class="Therapist"><%#Eval("Therapist") %></td>
                    <td class="FunctionalDiagnosis"><%#Eval("FunctionalDiagnosis") %></td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    <div class="ht-pager">
        <webdiyer:AspNetPager ID="PaginateCtl" runat="server" OnPageChanged="PaginateCtl_PageChanged" />
    </div>



</asp:Content>
<asp:Content ID="Content10" ContentPlaceHolderID="Footer" runat="Server">
    <p style="text-align:right">
        <asp:Button ID="btn_Edit" runat="server" CssClass="ui-btn" Text="信息查看" OnClick="btn_Edit_Click" OnClientClick="return Add()" />
    </p>


    <script type="text/javascript">
        $(function () {
            $("#grid tr").click(function () {

                $(this).find("input[type=radio]").attr("checked", "checked");
                $('#<%=hf_SelectedUserId.ClientID %>').val($(this).find("input[type=radio]").val());

                $("#grid tr").removeClass("selected");
                $(this).addClass("selected");

                //显示左边信息栏信息
                $("#lbl_UserName").text($(this).find(".UserName").text());
                $("#lbl_Gender").text($(this).find(".Gender").text());
                $("#lbl_Birthday").text($(this).find(".Birthday").text());
                $("#lbl_RecordNumber").text($(this).find(".RecordNumber").text());
                $("#lbl_BedNumber").text($(this).find(".BedNumber").text());
                $("#lbl_Hospitalized").text($(this).find(".Hospitalized").text());
                $("#lbl_Post").text($(this).find(".Post").text());
                $("#lbl_Doctor").text($(this).find(".Doctor").text());
                $("#lbl_Therapist").text($(this).find(".Therapist").text());
                $("#lbl_FunctionalDiagnosis").text($(this).find(".FunctionalDiagnosis").text());
            });
        });

        function Add() {
            if ($('#<%=hf_SelectedUserId.ClientID %>').val() < 1) {
                alert("请选择要操作的账号！");
                return false;
            }
            return true;
        }

        function Del() {
            if ($('#<%=hf_SelectedUserId.ClientID %>').val() < 1) {
                alert("请选择要操作的账号！");
                return false;
            }
            return confirm('确认要删除该数据吗？');
        }
    </script>
</asp:Content>
